package com.smartfactory.sail.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author 王巨壁
 * @title: PageParam
 * @projectName smart-sail
 * @description: 分页请求参数
 * @date 2019/7/2923:11
 */
@Data
public class PageParam {
    @ApiModelProperty(value = "当前页 默认当前第一页")
    private Long currentPage =1L;

    @ApiModelProperty(value = "每页展示数目 默认展示20条")
    private Integer size = 20;

    @ApiModelProperty(value = "1升序2降序 默认降序")
    private Integer sortType=2;

    @ApiModelProperty(value = "排序字段 默认修改时间排序")
    private String sortField="updateTime";

    public PageParam(Long currentPage, Integer size, Integer sortType, String sortField) {
        this.currentPage = currentPage;
        this.size = size;
        this.sortType = sortType;
        this.sortField = sortField;
    }
}
